<h1>Users objectives <%= @cuser.login unless @cuser.nil? %></h1>

<%= error_messages_for :cartasur_user %>
<% if flash[:error] %>
    <div style="color: #a11328;" class="error"><%= flash[:error] %></div>
<% end %>
<div id="page">
  <% if flash[:alert] %>
      <p class="flash-error"><%= flash[:alert] %></p>
  <% end %>
  <% if flash[:notice] %>
      <p class="flash-notice"><%= flash[:notice] %></p>
  <% end %>
  <%= yield %>
</div>
<p>

<table cellpadding="5" cellspacing="10">
  <th align="center" colspan="2"> </th>

  <% @cobjectives.each do |objective| %>
      <tr>
        <td>Time range: <%= objective.time_range %></td> Months: <%= objective.months %>
        <td>Days: <%= objective.days %> Location: <%= objective.location %> | <%=  link_to("Edit" , edit_cartasur_objective_path(objective)) %> | Users  <%=  link_to("Users" ,showusers_cartasur_objective_path(objective)) %></td>
      </tr>
  <% end unless @cobjectives.nil? %>

</table>

</p>
